//
// Created by Castle-Moriarty on 2025/10/31.
//

#include <iostream>
using namespace std;

double sum(const double(&scores)[5]) {
    double sum{};
    for (size_t i{};i < size(scores);i++) {
        sum += scores[i];
    }

    // for (auto score : scores) {
    //     sum += score;
    // }
    return sum;
}


int main() {
    double student_scores []{1.0,2.0,3.0,4.0,5.0};
    double result = sum(student_scores);
    cout << result << endl;
    return 0;
}